import math


def zhui(xa, ya, xb, yb):
    '''

    :param xa: 追逐者x位置int
    :param ya: 追逐者y位置
    :param xb: 被追逐者x位置
    :param yb: 被追逐者y位置
    :return: 速度元组
    '''
    # print(__name__)
    w = xb - xa  # 计算x位置差
    w2 = yb - ya  # 计算y位置差
    c = math.fabs(w)
    c2 = math.fabs(w2)
    if c == 0 and c2 == 0:
        d = (0, 0)
    elif c == 0:
        d = (0, w2 / c2)
    elif c2 == 0:
        d = (w / c, 0)
    else:
        d=(w/c,w2/c2)
    return d


if __name__ == '__main__':
    print(zhui(6, 5, 4, 4))
